Page({
  data: {},
  onLoad() {
    this.getVisitorList()
  },
  async getVisitorList() {
    const { code, data } = await wx.http.get('/visitor')
    console.log(data)
    if (code !== 10000) return wx.utils.toast('获取邀请记录失败')
    this.setData({
      visitorList: data.rows,
    })
  },
  goPassport(ev) {
    wx.navigateTo({
      url: '/visitor_pkg/pages/passport/index?id=' + ev.mark.id,
    })
  },
})
